
<form action="{:url()}" method="post" data-auto="true" class="layui-form layui-card" data-table-id="MemberTable">
    <div class="layui-card-body">
        <div class="layui-form-item">
            <label class="layui-form-label">邮箱</label>
            <div class="layui-input-block">
                <input name="email" value="{$vo.email|default=''}" required {notempty name="$vo.id"} readonly {/notempty} vali-name="邮箱" placeholder="请输入邮箱" class="layui-input" type="text">
                <p class="help-block"><b>必填</b>，请填写邮箱</p>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">登录密码</label>
            <div class="layui-input-block">
                <input name="passwd" value=""  placeholder="登录密码" class="layui-input" type="text">
                <p class="help-block"><b>必填</b>，请填写登录密码</p>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">交易密码</label>
            <div class="layui-input-block">
                <input name="trade_passwd" value=""   placeholder="交易密码" class="layui-input" type="text">
                <p class="help-block">请填写交易密码</p>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">邀请码</label>
            <div class="layui-input-block">
                <input name="invite_code" value="{$vo.invite_code|default=''}"   placeholder="邀请码" class="layui-input" {notempty name="$vo.id"} readonly {/notempty} type="text">
                <p class="help-block">*上级邀请码（不输入默认无代理）</p>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label label-required-next">会员代理</label>
            <div class="layui-input-block">
                <select name='is_agent' class='layui-select'>
                    <option value="0">会员</option>
                    <option value="1">代理</option>
                </select>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label label-required-next">秒合约风控</label>
            <div class="layui-input-block">
                <select name='contract_switch' class='layui-select' >
                    <option value="0">不设置</option>
                    <option value="1">盈利</option>
                    <option value="2">亏损</option>
                </select>
                <p class="help-block"><b>必选</b></p>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">代理专属客服链接</label>
            <div class="layui-input-block">
                <input name="customer_link" value="{$vo.customer_link|default=''}"  placeholder="请输入客服链接" class="layui-input"  type="text">
                <p class="help-block"><b>选择代理必填</b></p>
            </div>
        </div>
    </div>
    <div class="hr-line-dashed"></div>
    <input type='hidden' value='{$vo.id|default=0}' name='id'>
    <div class="layui-form-item text-center">
        <button class="layui-btn" type='submit'>保存数据</button>
        <button class="layui-btn layui-btn-danger" type='button' data-confirm="确定要取消编辑吗？" data-close>取消编辑</button>
    </div>
</form>
<script type="text/javascript">
        $.form.setValue("is_agent","{$vo.is_agent|default=0}");
        $.form.setValue("contract_switch","{$vo.contract_switch|default=0}");
</script>
